package com.sinochem.yunlian.ship.common.constant;

/**
 * Created by ace on 2017/8/29.
 */
public class RedisKey {

    //Redis Key命名规范：微服务模块:key:业务模块1:业务模块2:操作类型:%s
    //常量名全部大写,微服务模块_KEY_业务模块1_业务模块2_操作类型/微服务模块_KEY_业务模块1_业务模块2_操作类型_PREFIX
    public final static String KEY_BIZ_NO= "key:biz:no:";

    public final static String KEY_PORT_MAP = "base:key:port:map";

    public final static String KEY_MATERIAL_CATEGORY_MAP = "base:key:material:category:map";

    public final static String KEY_NODE_MAP = "base:key:node:map";

    public final static String KEY_CITY_MAP = "base:key:city:map";

    public final static String KEY_PORT_ALL = "base:key:port:all";

    public final static String KEY_MATERIAL_CATEGORY_ALL = "base:key:material:category:all";

    public final static String KEY_NODE_ALL = "base:key:node:all";

    public final static String KEY_MATERIAL_CATEGORY_LEVEL = "base:key:material:category:level";

    public final static String KEY_CATEGORY_LEVEL_PREFIX = "base:key:category:level:%s";

    public final static String KEY_TRADE_MATERIAL_PUSH = "trade:key:material:push:%s";

    public final static String KEY_SHIP_LOCATION_PREFIX = "ucenter:key:ship:location:%s";
    
    /**
     * 运营后台 一级、二级货品列表
     */
    public final static String KEY_MATERIAL_CATEGORY_LEVEL_LIST = "base:key:material:category:level:list";

    /**
     * 所有非必填节点
     */
    public final static String NOT_REQUIRED_KEY_NODE_ALL = "base:key:node:not:required:all";

    /**
     * 装货港必填节点
     */
    public final static String REQUIRED_KEY_NODE_FROM = "base:key:node:required:from";

    /**
     * 装货港非必填节点
     */
    public final static String NOT_REQUIRED_KEY_NODE_FORM = "base:key:node:not:required:from";

    /**
     * 装货港所有节点
     */
    public final static String KEY_NODE_FROM = "base:key:node:from";

    /**
     * 卸货港必填节点
     */
    public final static String REQUIRED_KEY_NODE_TO = "base:key:node:required:to";

    /**
     * 卸货港非必填节点
     */
    public final static String NOT_REQUIRED_KEY_NODE_TO = "base:key:node:not:required:to";

    /**
     * 卸货港所有节点
     */
    public final static String KEY_NODE_TO = "base:key:node:to";

    /**
     * 所有必填节点
     */
    public final static String REQUIRED_KEY_NODE_ALL = "base:key:node:required:all";

    public final static String KEY_DICT_ITEM_LIST_PREFIX = "base:key:dict:list:%s";

    public final static String KEY_DICT_ITEM_LIST_BY_GROUP_PREFIX = "base:key:dict:list:group:%s:%s";

    public final static String KEY_DICT_ITEM_LIST_ORDER_PREFIX = "base:key:dict:list:order:%s";

    public final static String KEY_DICT_ITEM_MAP_PREFIX = "base:key:dict:map:%s";

    public final static String KEY_DIC_ALL_ITEM = "base:key:node:items";

    public final static String KEY_DIC_ALL_Exception = "base:key:exception:info";
    
    public final static String UCENTER_APP_USER_AND_COMPANY="ucenter:app:key:user:and:company";
    
    public final static String UCENTER_PC_USER_AND_COMPANY="ucenter:pc:key:user:and:company";
    
    /**
     * 限制访问接口次数
     */
    public final static String LIMIT_INTERFACE_NUMBER = "limit:interface:number:";

    //用户在线key
    public final static String UCENTER_ONLINE_PREFIX="ucenter:key:user:online:%s";

    //App Version Key
    public final static String KEY_VERSION_PREFIX="base:key:version:%s";
    
    //用户登录token
    public final static String UCENTER_LOGIN_TOKEN_PREFIX="ucenter:key:user:token:%s";

    //环信应用token
    public final static String UCENTER_IM_TOKEN = "ucenter:im:token:%s";

    //船舶浏览量
    public final static String UCENTER_KEY_SHIP_COUNT_PREFIX="ucenter:key:count:ship:%s";
    
    // 货盘浏览次数
    public final static String TRADE_MATERIAL_TOTALVIEWS = "trade:material:totalViews:%s";

    //用户基本信息缓存---user id
    public final static String UCENTEREXT_USER_BASIC_ID_PREFIX="ucenterext:key:user:basic:id:%s";

    //用户状态缓存---user id
    public final static String UCENTEREXT_USER_STATUS_ID_PREFIX="ucenterext:key:user:status:id:%s";

    //用户基本信息缓存---userId
    public final static String UCENTEREXT_USER_BASIC_USERID_PREFIX="ucenterext:key:user:basic:userid:%s";

    //公司基本信息缓存
    public final static String UCENTEREXT_COMPANY_BASIC_PREFIX="ucenterext:key:company:basic:%s";

    //ACL用户角色缓存
    public final static String UCENTEREXT_ACL_USERROLE_PREFIX ="ucenterext:key:acl:userrole:%s";

    //ACL角色权限缓存
    public final static String UCENTEREXT_ACL_ROLERES_PREFIX ="ucenterext:key:acl:roleres:%s";

    // 船舶动态缓存
    public final static String MESSAGE_SHIP_DYNAMIC_PREFIX = "message:key:ship:dynamic:%s";

    // 船舶位置mmsi缓存
    public final static String MESSAGE_SHIP_LOCATION_MMSI_PREFIX = "message:key:ship:location:mmsi:%s";

    // 船舶位置shipId缓存
    public final static String MESSAGE_SHIP_LOCATION_SHIPID_PREFIX = "message:key:ship:location:shipid:%s";

    // 天气
    public final static String MESSAGE_WEATHER_PREFIX = "message:key:weather:%s";

    // 货主企业角色列表
    public final static String UCENTEREXT_CARGO_COMPANY_ROLE = "ucenterext:key:cargo:company:role";
    
    // 船东企业角色列表
    public final static String UCENTEREXT_SHIP_COMPANY_ROLE = "ucenterext:key:ship:company:role";
    
    // 根据roleCode 缓存
    public final static String UCENTEREXT_ROLE = "ucenterext:key:role:%s";

    /**
     * 微信accesstoken緩存
     */
    public final static String WEIXIN_ACCESS_TOKEN = "ucenter:weixin:accesstoken";

    public final static String WEIXIN_JS_API_TICKET = "ucenter:weixin:jsapiticket";

    /**
     * 社区动态发布最新时间
     */
    public final static String SOCIAL_DYNAMIC_LASTTIME = "social:dynamic:lasttime";
    
    /**
     * 船舶当前航次
     */
    public final static String SHIP_VOYAGE = "schedule:ship:voyage:shipId:%s";


    /**
     * 港口网转百度坐标缓存
     */
    public final static String GKW_LONGITUDE = "message:key:typhoon:gkwlongitude:%s";
    public final static String GKW_LATITUDE = "message:key:typhoon:gkwlatitude:%s";


    /**
     * 港口网台风信息缓存
     */
    public final static String GKW_TYPHOON_INFO = "message:key:typhoon:gkwtyphooninfo:%s";








}
